//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
  {
    //登录
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录', //菜单标题
      hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
      icon: 'Promotion', //菜单文字左侧的图标,支持element-plus全部图标
    },
  },
  // {
  //   //登录成功以后展示数据的路由
  //   path: '/',
  //   component: () => import('@/layout/index.vue'),
  //   name: 'layout',
  //   meta: {
  //     title: '',
  //     hidden: false,
  //     icon: '',
  //   },
  //   redirect: '/home',
  //   children: [
  //     {
  //       path: '/home',
  //       component: () => import('@/views/home/index.vue'),
  //       meta: {
  //         title: '首页',
  //         hidden: false,
  //         icon: 'HomeFilled',
  //       },
  //     },
  //   ],
  // },
  {
    //404
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
      icon: 'DocumentDelete',
    },
  },
  {
    // path: '/system',
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'System',
    meta: {
      title: '系统管理',
      icon: 'Setting',
    },
    redirect: '/system/terminal',
    children: [
      {
        path: '/system/terminal',
        component: () => import('@/views/system/terminal/index.vue'),
        name: 'Terminal',
        meta: {
          title: '终端参数',
          // icon: 'User',
        },
      },
      {
        path: '/system/password',
        component: () => import('@/views/system/password/index.vue'),
        name: 'Password',
        meta: {
          title: '用户密码',
          // icon: 'User',
        },
      },
      // {
      //   path: '/system/remotepassword',
      //   component: () => import('@/views/system/remotepassword/index.vue'),
      //   name: 'Remotepassword',
      //   meta: {
      //     title: '密码管理',
      //     icon: 'User',
      //   },
      // },
      {
        path: '/system/network',
        component: () => import('@/views/system/network/index.vue'),
        name: 'Network',
        meta: {
          title: '网络参数',
          // icon: 'User',
        },
      },
      {
        path: '/system/profile',
        component: () => import('@/views/system/profile/index.vue'),
        name: 'Profile',
        meta: {
          title: '配置文件',
          // icon: 'User',
        },
      },
      {
        path: '/system/algorithmConfig',
        component: () => import('@/views/system/algorithmConfig/index.vue'),
        name: 'AlgorithmConfig',
        meta: {
          title: '配置算法',
          // icon: 'User',
        },
      },
      {
        path: '/system/restartrecover',
        component: () => import('@/views/system/restartrecover/index.vue'),
        name: 'Restartrecover',
        meta: {
          title: '重启及恢复',
          // icon: 'User',
        },
      },
      {
        path: '/system/upgrade',
        component: () => import('@/views/system/upgrade/index.vue'),
        name: 'Upgrade',
        meta: {
          title: '系统升级',
          // icon: 'User',
        },
      },
    ],
  },
  {
    path: '/interface',
    component: () => import('@/layout/index.vue'),
    name: 'Interface',
    meta: {
      title: '接口参数',
      icon: 'SetUp',
    },
    redirect: '/interface/serialPort',
    children: [
      {
        path: '/interface/serialPort',
        component: () => import('@/views/interface/serialPort/index.vue'),
        name: 'serialPort',
        meta: {
          title: '串口配置',
          // icon: 'User',
        },
      },
      {
        path: '/interface/ioConfig',
        component: () => import('@/views/interface/ioConfig/index.vue'),
        name: 'IoConfig',
        meta: {
          title: 'I/O配置',
          // icon: 'User',
        },
      },

    ],
  },
  {
    path: '/dataCenter',
    component: () => import('@/layout/index.vue'),
    name: 'DataCenter',
    meta: {
      title: '数传中心',
      icon: 'Switch',
    },
    redirect: '/dataCenter/center',
    children: [
      {
        path: '/dataCenter/center',
        component: () => import('@/views/dataCenter/center/index.vue'),
        name: 'Center',
        meta: {
          title: '数传中心',
          icon: 'Switch',
        },
      },
    ],
  },
  {
    path: '/dataMonitor',
    component: () => import('@/layout/index.vue'),
    name: 'DataMonitor',
    meta: {
      title: '实时监测数据',
      icon: 'DataLine',
    },
    redirect: '/dataMonitor/gorgestat',
    children: [
      {
        path: '/dataMonitor/gorgestat',
        component: () => import('@/views/dataMonitor/gorgestat/index.vue'),
        name: 'Gorgestat',
        meta: {
          title: '串口统计',
          // icon: 'User',
        },
      },
      {
        path: '/dataMonitor/gathershow',
        component: () => import('@/views/dataMonitor/gathershow/index.vue'),
        name: 'Gathershow',
        meta: {
          title: '实时数据',
          // icon: 'User',
        },
      },
      {
        path: '/dataMonitor/alarmdata',
        component: () => import('@/views/dataMonitor/alarmdata/index.vue'),
        name: 'Alarmdata',
        meta: {
          title: '实时报警',
          // icon: 'User',
        },
      },
    ],
  },

  {
    path: '/gatherOrder',
    component: () => import('@/layout/index.vue'),
    name: 'GatherOrder',
    meta: {
      title: '采集指令配置',
      icon: 'DocumentCopy',
    },
    redirect: '/gatherOrder/devicetype',
    children: [
      {
        path: '/gatherOrder/devicetype',
        component: () => import('@/views/gatherOrder/devicetype/index.vue'),
        name: 'Devicetype',
        meta: {
          title: '设备类型',
          // icon: 'User',
        },
      },
      {
        path: '/gatherOrder/codelibrary',
        component: () => import('@/views/gatherOrder/codelibrary/index.vue'),
        name: 'Codelibrary',
        meta: {
          title: '信号配置',
          // icon: 'User',
        },
      },
      {
        path: '/gatherOrder/serialPortConfig',
        component: () => import('@/views/gatherOrder/serialPortConfig/index.vue'),
        name: 'SerialPortConfig',
        meta: {
          title: '串口绑定',
          // icon: 'User',
        },
      },
    ],
  },




  // {
  //   path: '/acl',
  //   component: () => import('@/layout/index.vue'),
  //   name: 'Acl',
  //   meta: {
  //     title: '权限管理',
  //     icon: 'Lock',
  //   },
  //   redirect: '/acl/user',
  //   children: [
  //     {
  //       path: '/acl/user',
  //       component: () => import('@/views/acl/user/index.vue'),
  //       name: 'User',
  //       meta: {
  //         title: '用户管理',
  //         icon: 'User',
  //       },
  //     },
  //     {
  //       path: '/acl/role',
  //       component: () => import('@/views/acl/role/index.vue'),
  //       name: 'Role',
  //       meta: {
  //         title: '角色管理',
  //         icon: 'UserFilled',
  //       },
  //     },
  //     {
  //       path: '/acl/permission',
  //       component: () => import('@/views/acl/permission/index.vue'),
  //       name: 'Permission',
  //       meta: {
  //         title: '菜单管理',
  //         icon: 'Monitor',
  //       },
  //     },
  //   ],
  // },
  // {
  //   path: '/screen',
  //   component: () => import('@/views/screen/index.vue'),
  //   name: 'Screen',
  //   meta: {
  //     hidden: false,
  //     title: '数据大屏',
  //     icon: 'Platform',
  //   },
  // },
  {
    path: '/screen',
    component: () => import('@/views/screen/index.vue'),
    name: 'Screen',
    meta: {
      hidden: false,
      title: '数据大屏',
      icon: 'Platform',
    },
  },
  {
    //任意路由
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'DataLine',
    },
  },
]
